home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmSaveBit
- BorderStyle = 3 'Fixed Double
- Caption = "Initialize new bitmap"
- ClientHeight = 4455
- ClientLeft = 4005
- ClientTop = 1620
- ClientWidth = 3915
- ClipControls = 0 'False
- ControlBox = 0 'False
- Height = 4860
- Left = 3945
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4455
- ScaleWidth = 3915
- Top = 1275
- Width = 4035
- Begin TextBox tbxBorder
- Height = 285
- Left = 675
- MaxLength = 1
- TabIndex = 3
- Text = "2"
- Top = 2250
- Width = 390
- End
- Begin CheckBox chkSave
- Caption = "Button OFF"
- Height = 330
- Index = 2
- Left = 1050
- TabIndex = 2
- Top = 990
- Width = 1365
- End
- Begin CheckBox chkSave
- Caption = "Button DOWN"
- Height = 330
- Index = 1
- Left = 1050
- TabIndex = 1
- Top = 585
- Width = 1590
- End
- Begin CheckBox chkSave
- Caption = "Button UP"
- Height = 330
- Index = 0
- Left = 1050
- TabIndex = 0
- Top = 135
- Width = 1290
- End
- Begin CommandButton cmdCancel
- Cancel = -1 'True
- Caption = "Cancel"
- Height = 375
- Left = 2175
- TabIndex = 5
- Top = 3825
- Width = 1000
- End
- Begin CommandButton cmdOK
- Caption = "OK"
- Default = -1 'True
- Height = 375
- Left = 600
- TabIndex = 4
- Top = 3825
- Width = 1000
- End
- Begin Label Label3
- Caption = "Thickness of the border around each button. Max 9"
- Height = 465
- Left = 1200
- TabIndex = 8
- Top = 2160
- Width = 2340
- End
- Begin Line Line1
- BorderColor = &H00008000&
- X1 = 600
- X2 = 3150
- Y1 = 2700
- Y2 = 2700
- End
- Begin Label Label2
- Caption = "This selection will stay in force until you resize the drawing area, when the bitmap will be reinitialized"
- Height = 870
- Left = 600
- TabIndex = 7
- Top = 2790
- Width = 2790
- End
- Begin Label Label1
- Caption = "Check the buttons you wish to save to the master bitmap."
- Height = 465
- Left = 600
- TabIndex = 6
- Top = 1620
- Width = 2640
- End
- Option Explicit
- Sub cmdCancel_Click ()
- Unload frmSaveBit
- End Sub
- Sub cmdOK_Click ()
- Dim n As Integer
- Dim Count As Integer
- Dim NumButtons As Integer
- Dim FrameWidth As Integer
- 'Width of the border that surrounds the picturebox
- FrameWidth = GetSystemMetrics(SM_CXBORDER) * 2
- 'Put which buttons need to be saved into Count
- ''Up' = 1, Down = 2, Disabled = 4
- For n = 0 To 2
- If chkSave(n) > 0 Then
- Count = Count + (2 ^ n)
- NumButtons = NumButtons + 1
- End If
- Next n
- 'If the border width for the boxes is illegal then retry
- If IsNumeric(tbxBorder) Then
- BitMap.Border = tbxBorder
- Else
- MsgBox "Please enter the border width"
- tbxBorder.SetFocus
- Exit Sub
- End If
- If NumButtons < 1 Then
- MsgBox "Nothing Selected"
- Exit Sub
- End If
- 'Put the buttons to be saved into BitMap.Buttons
- BitMap.Buttons = Count
- frmBitMap!picBitMap.Width = (BitMap.ButtonWidth + (BitMap.Border * 2)) * NumButtons + FrameWidth
- Unload frmSaveBit
- End Sub
- Sub Form_Activate ()
- HelpItem = 24
- End Sub
- Sub Form_KeyDown (KeyCode As Integer, Shift As Integer)
- If KeyCode = &H70 Then Cheap_Help Format$(HelpItem)
- End Sub
- Sub Form_Load ()
- Position_Form frmSaveBit
- KeyPreview = True
- End Sub
- Sub tbxBorder_GotFocus ()
- tbxBorder.SelStart = 0
- tbxBorder.SelLength = Len(tbxBorder)
- End Sub
-